package com.mkx.orderedlist.avl;

/**
 * AVL树节点类
 * @param <K> 键类型
 * @param <V> 值类型
 */
class AVLTreeNode<K extends Comparable<K>, V> {
    K key;
    V value;
    int height;
    AVLTreeNode<K, V> left;
    AVLTreeNode<K, V> right;
    
    /**
     * 构造函数
     * @param key 键
     * @param value 值
     */
    AVLTreeNode(K key, V value) {
        this.key = key;
        this.value = value;
        this.height = 1; // 新节点的高度为1
        this.left = null;
        this.right = null;
    }
}
